﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomePage.master" AutoEventWireup="true"
    CodeFile="DattourStep1.aspx.cs" Inherits="DattourStep1" %>
<%@ Import Namespace="AppCommon" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Đăng ký tour | <%= Constants.TITLE_MAIN_PAGE %></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="upall" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div class="row dangky-tour">
                <div class="col-lg-12 col-md-12 dangky-tour-menu">
                    <ul>
                        <li class="active">1. Chọn tour</li>
                        <li class="active">2. Đăng ký</li>
                        <li class="">3. Chọn hình thức thanh toán</li>
                        <li class="">4. Khách hàng xác nhận</li>
                        <li class="">5. V.Y.C xác nhận</li>
                        <li class="">6. Thanh toán</li>
                    </ul>
                </div>
                <div class="col-lg-12 col-md-12 dangky-tour-info">
                    <h4 class="alert alert-warning">
                        Vui lòng điền những thông tin cần thiết để tạo mới đăng ký Tour</h4>
                    <ul>
                        <li>Tiêu đề tour : <asp:Literal runat="server" ID="litTieudetour" EnableViewState="False"></asp:Literal></li>
                        <li>Ngày khởi hành : <asp:Literal runat="server" ID="litNgaykhoihanh" EnableViewState="False"></asp:Literal></li>
                        <li>Nơi khởi hành : <asp:Literal runat="server" ID="litNoikhoihanh" EnableViewState="False"></asp:Literal></li>
                        <li>Số chỗ còn nhận : <span class="label label-danger"><asp:Literal runat="server" ID="litSocho" EnableViewState="False"></asp:Literal></span></li>
                    </ul>
                </div>
                <!--/ end dangky-tour-info -->
                <div class="col-lg-12 col-md-12 dangky-tour-info">
                    <h4 class="alert alert-warning">
                        Giá tour cơ bản</h4>
                    <p>
                        Giá của tour : <asp:Literal runat="server" ID="litGiatour"></asp:Literal> VNĐ</p>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Giá tour chi tiết</div>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>
                                        #
                                    </th>
                                    <th>
                                        Việt Nam
                                    </th>
                                    <th>
                                        Việt Kiều
                                    </th>
                                    <th>
                                        Nước Ngoài
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>
                                        Người lớn (12 tuổi trở lên)
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourNL1" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourNL2" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourNL3" EnableViewState="False"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Trẻ em (Từ 2 đến dưới 12 tuổi)
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTE1" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTE2" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTE3" EnableViewState="False"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Trẻ nhỏ (Dưới 2 tuổi)
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTN1" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTN2" EnableViewState="False"></asp:Literal>
                                    </td>
                                    <td>
                                        <asp:Literal runat="server" ID="litGiatourTN3" EnableViewState="False"></asp:Literal>
                                    </td>
                                </tr>
                            </tbody>
                        </table>                        
                    </div>
                    <p class="text-danger">*Trẻ nhỏ từ 24 tháng tuổi trở xuống mua vé máy bay theo quy định của hãng hàng không</p>
                </div>
                <!--/ end dangky-tour-info -->
                <div class="col-lg-12 col-md-12 dangky-tour-info">
                    <h4 class="alert alert-warning">
                        Phụ thu theo khách</h4>
                    <p>
                        Phụ thu Visa : <span class="label label-danger">Liên hệ</span></p>
                </div>
                <div class="col-lg-12 col-md-12 form-horizontal dangky-tour-info">
                    <h4 class="alert alert-warning">
                        Thông tin đăng ký</h4>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Tên công ty</label>
                        <div class="col-sm-10">
                            <asp:TextBox runat="server" ID="tbTencongty" CssClass="form-control" placeholder="Ten cong ty"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Họ và tên *</label>
                        <div class="col-sm-10">
                            <asp:TextBox runat="server" ID="tbHovaten" CssClass="form-control" placeholder="Họ và tên"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ForeColor="Red" runat="server"
                            SetFocusOnError="True" ControlToValidate="tbHovaten" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Địa chỉ</label>
                        <div class="col-sm-10">
                            <asp:TextBox runat="server" ID="tbDiachi" CssClass="form-control" placeholder="Địa chỉ"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Điện thoại *</label>
                        <div class="col-sm-6">
                            <asp:TextBox runat="server" ID="tbDienthoai" CssClass="form-control" placeholder="Điện thoại"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ForeColor="Red" runat="server"
                            SetFocusOnError="True" ControlToValidate="tbDienthoai" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Email *</label>
                        <div class="col-sm-6">
                            <asp:TextBox runat="server" ID="tbEmail" CssClass="form-control" placeholder="Email"></asp:TextBox>                            
                            <asp:RegularExpressionValidator ID="regexEmailValid" runat="server" 
                            ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                            ControlToValidate="tbEmail" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Di động</label>
                        <div class="col-sm-6">
                            <asp:TextBox runat="server" ID="tbDidong" CssClass="form-control" placeholder="Di động"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            Mã số thuế</label>
                        <div class="col-sm-6">
                            <asp:TextBox runat="server" ID="tbMasothue" CssClass="form-control" placeholder="Mã số thuế"></asp:TextBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">
                            CMND </label>
                        <div class="col-sm-6">
                            <asp:TextBox runat="server" ID="tbCmnd" CssClass="form-control" placeholder="Số chứng minh thư"></asp:TextBox>
                        </div>
                    </div>
                    <asp:UpdatePanel ID="uppanel1" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                    Tổng số khách
                                </label>
                                <div class="col-sm-2">
                                    <asp:TextBox runat="server" ID="tbSlTongsokh" MaxLength="4" CssClass="form-control"
                                        placeholder="0" EnableViewState="True" disabled></asp:TextBox>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                    Người lớn</label>
                                <div class="col-sm-5">
                                    <asp:TextBox ID="tbSlNguoilon" MaxLength="2" CssClass="form-control" ToolTip="Từ 12 tuổi trở lên" runat="server" Width="140px"
                                        OnTextChanged="tbSlNguoilon_TextChange" AutoPostBack="True" Text="0"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ForeColor="Red"
                                        runat="server" ErrorMessage="Chỉ cho nhập số" Display="Dynamic" ValidationExpression="\d+"
                                        ControlToValidate="tbSlNguoilon"></asp:RegularExpressionValidator>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                    Trẻ em</label>
                                <div class="col-sm-5">
                                    <asp:TextBox ID="tbSlTreem" MaxLength="2" CssClass="form-control" runat="server" ToolTip="Từ 2 tuổi đến dưới 12 tuổi" Width="140px"
                                        AutoPostBack="True" OnTextChanged="tbSlNguoilon_TextChange" Text="0"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ForeColor="Red"
                                        runat="server" ErrorMessage="Chỉ cho nhập số" Display="Dynamic" ValidationExpression="\d+"
                                        ControlToValidate="tbSlTreem"></asp:RegularExpressionValidator>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">
                                    Trẻ nhỏ</label>
                                <div class="col-sm-5">
                                    <asp:TextBox ID="tbSlTrenho" MaxLength="2" CssClass="form-control" runat="server" ToolTip="Dưới 2 tuổi" Width="140px" AutoPostBack="True"
                                        OnTextChanged="tbSlNguoilon_TextChange" Text="0"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" ForeColor="Red"
                                        runat="server" ErrorMessage="Chỉ cho nhập số" Display="Dynamic" ValidationExpression="\d+"
                                        ControlToValidate="tbSlTrenho"></asp:RegularExpressionValidator>
                                </div>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
                <div class="col-lg-12 col-md-12 dangky-tour-info">
                    <h4 class="alert alert-warning">DANH SÁCH KHÁCH HÀNG ĐI TOUR</h4>
                    <div class="form-group">
                        <asp:UpdatePanel ID="uppanel2" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <asp:GridView ID="gridViewInfo" CssClass="table table-responsive" runat="server" ShowFooter="True" AutoGenerateColumns="False"
                                    OnRowDataBound="Gridview1_RowDataBound" EnableModelValidation="True">
                                    <Columns>
                                        <asp:BoundField DataField="RowNumber" HeaderText="STT">
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Họ và tên<span style='color: #CC3300'>(*)</span>"
                                            ControlStyle-Width="100px">
                                            <ItemTemplate>
                                                <asp:TextBox ID="tbGvHovaten" AutoPostBack="true" runat="server" OnTextChanged="TextChangedEvent"
                                                    Width="100px"></asp:TextBox>
                                            </ItemTemplate>
                                            <ControlStyle Width="120px" />
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày sinh" ControlStyle-Width="70px">
                                            <ItemTemplate>
                                                <asp:TextBox ID="tbGvNgaysinh" AutoPostBack="true" runat="server" OnTextChanged="TextChangedEvent"
                                                    Width="70px" placeholder="dd/mm/yyyy"></asp:TextBox>
                                            </ItemTemplate>                                            
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Địa chỉ" ControlStyle-Width="80px">
                                            <ItemTemplate>
                                                <asp:TextBox ID="tbGvDiachi" AutoPostBack="true" runat="server" OnTextChanged="TextChangedEvent"
                                                    Width="80px"></asp:TextBox>
                                            </ItemTemplate>                                            
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Giới Tính" ControlStyle-Width="60px">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="cboGioiTinh1" runat="server" AutoPostBack="true" Width="60px">
                                                </asp:DropDownList>
                                            </ItemTemplate>                                            
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Loại Khách" ControlStyle-Width="80px">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="cboLoaiKhach1" runat="server" AutoPostBack="true" Width="80px">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ControlStyle Width="80px" />
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Độ tuổi" ControlStyle-Width="80px">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="cboDoTuoi1" runat="server" AutoPostBack="true" Width="80px">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ControlStyle Width="80px" />
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Phòng đơn" ControlStyle-Width="60px">
                                            <ItemTemplate>
                                                <asp:DropDownList ID="cboPhongDon1" runat="server" AutoPostBack="true" Width="60px">
                                                </asp:DropDownList>
                                            </ItemTemplate>
                                            <ControlStyle Width="60px" />
                                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Trị giá" ControlStyle-Width="60px">
                                            <ItemTemplate>
                                                <asp:Label ID="lbTriGia1" runat="server" Font-Bold="true" ForeColor="#CC3300" Width="60px"></asp:Label>
                                            </ItemTemplate>
                                            <ControlStyle Width="60px" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <div class="form-group">
                            <p>
                                <i>(Định dạng ngày/tháng/năm)</i></p>
                            <p>
                                <label>
                                    Ghi chú:</label>
                                <asp:TextBox ID="tbGhichu" runat="server"></asp:TextBox>
                            </p>
                        </div>
                    </div>
                    <div class="form-group">                        
                        <div class="right div-btn">
                            <asp:Literal runat="server" ID="litResult" EnableViewState="False"></asp:Literal>
                            <asp:Button runat="server" ID="btChapnhan" Text="Chấp Nhận" UseSubmitBehavior="true" CssClass="form-control btn btn-danger" OnClick="btChapnhan_OnClick"/>                            
                            <input type="reset" class="form-control btn btn-default" value="Nhập lại"/>
                        </div>
                    </div>
                </div>
                <!-- End #1 -->
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <!-- end Noi dung -->
</asp:Content>
